import { createApp } from 'vue'
import App from './App.vue'
//映入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
//svg
import 'virtual:svg-icons-register'
//引入公共组件以及样式
import globalComponent from '@/components/index.ts'
import  '@/styles/index.scss'
// 引入路由
import router from '@/router/router.ts'
//引入pinia
import pinia from './store'
//路由鉴权
import './permission.ts'
// 引入自定义指令
import {isHasButton} from "@/directive/has.ts";

const app = createApp(App)
isHasButton(app)
app.use(ElementPlus,{locale: zhCn})

app.use(globalComponent)

app.use(router)

app.use(pinia)

app.mount('#app')
